<template>
	<div class="main">
		<ul>
			<h2>这是第一篇文章</h2>
			<li v-for="post in res" :key="post.id">
				<p class="dap">
					<span class="shang">栏目:{{post.lanmo}}</span>
					<span class="shang">作者:{{post.author}}</span>
					<span class="shang">发表于:{{post.time}}</span>

				</p>
				<p style="border: 1px dashed #B8B8B8;"></p>
				<h4>
					<router-link to="">
						<p class="zi">{{post.title}}</p>
						<p class="zi">{{post.titl}}</p>
					</router-link>
                   <p style="border: 1px dashed #B8B8B8;"></p>
				</h4>
				<p class="xiaop">
					上一编:{{post.diz}}
					下一编:{{post.dizi}}
				</p>
			</li>
		</ul>
	</div>
</template>

<script>
	//模拟请求到的数据
	let resData = [{
		"id": "1",
		"title": "欢迎使用PHP内容管理系统!",
		"author": "博学谷",
		"time": "05-31 14:50:07",
		"des": "文章描述",
		"lanmo": "PHP",
		"titl": "这是一篇系统自动生成的文章，您可以修改或删除。",
		"diz":"无",
		"dizi":"最涨薪PHP项目-PHP微信公众平台开发"
	}, ]
	export default {
		data() {
			return {
				res: resData
			}
		}
	}
</script>

<style>
	.main {
		background: #fff;
	}

	h2 {
		text-align: center;
	}
	.shang{
		padding: 8px;
		font-size: 13px;
		color: #B8B8B8;
	}
	.dap{
		text-align: center;
		}
		
	a {
		color: #000;
		text-decoration: none;
	}
	
	li {
		list-style: none;
	}
	ul{
		padding: 0;
	}
	.zi{
		font-size: 15px;
		color: black;
		font-weight: 400;
	}
	.xiaop{
		text-align: center;
		font-size: 8px;
		padding: 8px;
		margin-top: 0px;
	}
</style>
